package com.qinsoft.business.user.bean;

import java.util.Date;

import com.qinsoft.frame.common.UserInfo;

public class User {
	private Long userId;			//用户ID
	private String nick;			//用户昵称
	private String token;			//sessionKey
	private String permit;			//用户权限
	private Date loginTime;			//首次登录时间
	private Date nextTime;			//上次登录时间
	private Date deadline;			//到期时间
	private Long visitCount;		//访问次数
	private String reshToken;		//刷新TOKEN
	
	public User() {
		super();
	}
	
	public User(UserInfo userInfo, String permit, Date deadline) {
		super();
		this.userId = userInfo.getUserId();
		this.nick = userInfo.getNick();
		this.token = userInfo.getSessionKey();
		this.permit = permit;
		this.nextTime = new Date();
		this.deadline = deadline;
		this.reshToken = userInfo.getRefreshToken();
	}
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getNick() {
		return nick;
	}
	public void setNick(String nick) {
		this.nick = nick;
	}
	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	public String getPermit() {
		return permit;
	}
	public void setPermit(String permit) {
		this.permit = permit;
	}
	public Date getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}
	public Date getNextTime() {
		return nextTime;
	}
	public void setNextTime(Date nextTime) {
		this.nextTime = nextTime;
	}
	public Date getDeadline() {
		return deadline;
	}
	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}
	public Long getVisitCount() {
		return visitCount;
	}
	public void setVisitCount(Long visitCount) {
		this.visitCount = visitCount;
	}
	public String getReshToken() {
		return reshToken;
	}
	public void setReshToken(String reshToken) {
		this.reshToken = reshToken;
	}
}
